package com.mall.mapper;

import com.mall.pojo.login;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface registerMapper {
    @Insert("insert into login (account,password,nickName) VALUES (#{account},#{password},#{nickName})")
    void register(@Param("account") String account,@Param("password") String password,@Param("nickName")String nickName);
    @Select("select * from login where account=#{account}")
    login getLoginByAccount(String account);
    @Select("select * from login where nickName=#{nickName}")
    login getLoginByNickName(String nickName);
}
